A computer system may be booted-up by a basic input-output system (BIOS) during a power ON or restart phase. As a part of the boot process, the BIOS uses a memory reference code (MRC) to detect and configure a main memory in the computer system. A memory reference code generates a memory map of one or more memory devices coupled to the computer system. The BIOS may run the MRC once during each boot process and the memory map may not change until the computer system is booted-up again.